﻿using FigureDraw.Diagram;
using FigureDraw.Graphic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FigureDraw.Shapes.FlowchartShape
{
    public class ProcessFlowchart : MyShape
    {
        public ProcessFlowchart()
            : base()
        {
            brushColor = new MyColorInfo(255, 255, 255);
        }

        public ProcessFlowchart(MyPoint startPoint, MyPoint endPoint)
            : base(startPoint, endPoint)
        {
            brushColor = new MyColorInfo(255, 255, 255);
        }

        public override void Draw(CommonGraphic graphic)
        {
            MyRectInfo rect = MyRectInfo.Convert(startPoint, endPoint);
            graphic.DrawRectangle(rect.Position, rect.Size, strokeColor, strokeWidth, brushColor);
        }

        public override MyShape Clone(BlockDiagram diagram)
        {
            MyShape shape = diagram.DrawProcess(startPoint, endPoint);
            shape.StrokeColor = strokeColor;
            shape.StrokeWidth = strokeWidth;
            shape.BrushColor = brushColor;

            return shape; 
        }

        public override MyShape Clone()
        {
            MyShape shape = new ProcessFlowchart(startPoint, endPoint);
            shape.StrokeColor = strokeColor;
            shape.StrokeWidth = strokeWidth;
            shape.BrushColor = brushColor;

            return shape;
        }
    }
}
